import request from 'service/request';

export function getInfo() {
  return request({
    url: '/user/getUser',
    method: 'get'
  });
}
// 接收手机验证码
export function getVerifyCode(option) {
  return request({
    url: '/user/sendVerificationCode',
    method: 'get',
    params:{
    	phone:option.phone
    }
  });
}
// 注册会员
export function register(option) {
  return request({
    url: '/user/register',
    method: 'POST',
    data:option.data
  });
}


export function addRcmInfo(data) {
  return request({
    url: '/user/referrer',
    method: 'POST',
    data
  });
}
// 获取积分
export function getstatisticsData(option) {
  return request({
    url: '/user/statisticsData',
    method: 'get'
  });
}
// 获取邀请好友信息
export function getStatInviterCredit(){
  return request({
    url:'/credit/statInviterCredit',
    method:'get'
  })
}
export function getStatInviterData(){
  return request({
    url:'/credit/statInviterData',
    method:'get'
  })
}
// 获取活动积分数据统计
export function getStatActivityCreditDate(){
  return request({
    url:'/credit/statActivityCreditDate',
    method:'get'
  })
}
// 获取购买积分数据统计
export function getStatPuchaseCreditDate(){
  return request({
    url:'/credit/statPuchaseCreditDate',
    method:'get'
  })
}


export function addAdminCode(data) {
  return request({
    url: '/user/updateOfflineOperator',
    method: 'POST',
    data
  });
}

